package com.tim.helper.project.history;

import org.apache.commons.lang3.StringUtils;
import org.junit.Test;

import java.util.Arrays;

public class DailyTalkHelper {
    @Test
    public void printReq(){
    String str =
        " \"userOrderId\":\"用户订单Id\",\n"
            + "    \"userAfterSaleId\":\"用户售后Id\",\n"
            + " \"salesType\":\"售后类型\",\n"
            + "    \"reasonId\":4,\n"
            + "    \"number\":2,\n"
            + "    \"refundAmount\":20,\n"
            + "    \"fileList\":[ ],\n"
            + "    \"salesExplain\":\"12211212222\",\n"
            + "    \"orderSaleId\":\"\",\n"
            + "    \"orderId\":2232626270640531,\n"
            + "    \"salesReason\":\"质量问题\",\n"
            + "    \"version\":0";
        String[] split = str.split("[\r\n]+");
    Arrays.stream(split)
        .filter(StringUtils::isNotBlank)
        .forEach(
            e -> {
                String[] strs = e.trim().replaceAll("\"", "")
                        .split(":");
                System.out.println(String.format("/**%2$s*/\nprivate String %1$s;\n", strs));
            });
    }





}
